<%--
  Created by IntelliJ IDEA.
  User: danielhonig
  Date: Sep 9, 2008
  Time: 12:11:37 AM
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>Dailog / AutoComplete: Stress Test</title>
    <meta name="layout" content="main" />
    <gui:resources components="dialog, richEditor, autoComplete" mode="minimal"/>
    <style type="text/css">
        /*margin and padding on body element
          can introduce errors in determining
          element position and are not recommended;
          we turn them off as a foundation for YUI
          CSS treatments. */
    body {
        margin: 0;
        padding: 0;
    }
    </style>
</head>

<body style="font-family: sans-serif">
<div class="yui-skin-sam" style="padding:50px">

    <h1>Dialog with AutoComplete stress test</h1>

    <g:each var="val" in="${(1..<51)}">

        <gui:dialog
                id="dlg_${val}"
                title="AutoComplete Beer Dialog ${val}"
                width="300px"
                triggers="[show:[type:'link', text:'AC popup link (' + val + ')!', on:'click']]"
                form="true"
                controller="demo"
                action="ajaxDialogSelectionMade"
                params="[id:7]"
                update="replaceMe">
            <!-- this autoComplete has no id... one is generated for it -->
            <gui:autoComplete
                    id="ac_${val}"
                    name="selection"
                    resultName="TestData"
                    labelField="description"
                    idField="id"
                    controller="demo"
                    action="testBeerDataAsJSON"
                    forceSelection="true"/>
            <br/><br/>
        </gui:dialog>

    </g:each>

</div>

</body>

</html>